//
// CPSFanLight.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.IStream;

public class CPSFanLight {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CPSFanLight(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CPSFanLight obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CPSFanLight(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public boolean completeBBox(SWIGTYPE_p_NLMISC__CAABBox box) {
    return nel3dJNI.CPSFanLight_completeBBox(swigCPtr, this, SWIGTYPE_p_NLMISC__CAABBox.getCPtr(box));
  }

  public CPSFanLight(long nbFans) {
    this(nel3dJNI.new_CPSFanLight__SWIG_0(nbFans), true);
  }

  public CPSFanLight() {
    this(nel3dJNI.new_CPSFanLight__SWIG_1(), true);
  }

  public void serial(IStream f) {
    nel3dJNI.CPSFanLight_serial(swigCPtr, this, IStream.getCPtr(f), f);
  }

  public void setNbFans(long nbFans) {
    nel3dJNI.CPSFanLight_setNbFans(swigCPtr, this, nbFans);
  }

  public void setPhaseSmoothness(long smoothNess) {
    nel3dJNI.CPSFanLight_setPhaseSmoothness(swigCPtr, this, smoothNess);
  }

  public long getPhaseSmoothness() {
    return nel3dJNI.CPSFanLight_getPhaseSmoothness(swigCPtr, this);
  }

  public void setMoveIntensity(float intensity) {
    nel3dJNI.CPSFanLight_setMoveIntensity(swigCPtr, this, intensity);
  }

  public float getMoveIntensity() {
    return nel3dJNI.CPSFanLight_getMoveIntensity(swigCPtr, this);
  }

  public long getNbFans() {
    return nel3dJNI.CPSFanLight_getNbFans(swigCPtr, this);
  }

  public void setPhaseSpeed(float multiplier) {
    nel3dJNI.CPSFanLight_setPhaseSpeed(swigCPtr, this, multiplier);
  }

  public float getPhaseSpeed() {
    return nel3dJNI.CPSFanLight_getPhaseSpeed(swigCPtr, this);
  }

  public void updateMatAndVbForColor() {
    nel3dJNI.CPSFanLight_updateMatAndVbForColor(swigCPtr, this);
  }

  public static void initFanLightPrecalc() {
    nel3dJNI.CPSFanLight_initFanLightPrecalc();
  }

  public boolean hasTransparentFaces() {
    return nel3dJNI.CPSFanLight_hasTransparentFaces(swigCPtr, this);
  }

  public boolean hasOpaqueFaces() {
    return nel3dJNI.CPSFanLight_hasOpaqueFaces(swigCPtr, this);
  }

  public long getNumWantedTris() {
    return nel3dJNI.CPSFanLight_getNumWantedTris(swigCPtr, this);
  }

  public void setTexture(SWIGTYPE_p_CSmartPtrT_NL3D__ITexture_t tex) {
    nel3dJNI.CPSFanLight_setTexture(swigCPtr, this, SWIGTYPE_p_CSmartPtrT_NL3D__ITexture_t.getCPtr(tex));
  }

  public ITexture getTexture() {
    long cPtr = nel3dJNI.CPSFanLight_getTexture__SWIG_0(swigCPtr, this);
    return (cPtr == 0) ? null : new ITexture(cPtr, false);
  }

  public boolean hasLightableFaces() {
    return nel3dJNI.CPSFanLight_hasLightableFaces(swigCPtr, this);
  }

  public boolean supportGlobalColorLighting() {
    return nel3dJNI.CPSFanLight_supportGlobalColorLighting(swigCPtr, this);
  }

  public void enumTexs(SWIGTYPE_p_std__vectorT_NLMISC__CSmartPtrT_NL3D__ITexture_t_t dest, IDriver drv) {
    nel3dJNI.CPSFanLight_enumTexs(swigCPtr, this, SWIGTYPE_p_std__vectorT_NLMISC__CSmartPtrT_NL3D__ITexture_t_t.getCPtr(dest), IDriver.getCPtr(drv), drv);
  }

  public void setZBias(float value) {
    nel3dJNI.CPSFanLight_setZBias(swigCPtr, this, value);
  }

  public float getZBias() {
    return nel3dJNI.CPSFanLight_getZBias(swigCPtr, this);
  }

}
